/*
 * (C) Copyright 2014-2016, by Dimitrios Michail
 *
 * JHeaps Library
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jheaps.tree

import org.jheaps.AddressableHeap
import org.jheaps.AddressableHeapFactory
import org.jheaps.MergeableDoubleEndedAddressableHeap
import org.junit.Test

/*class ReflectedPairingHeapMergeableDoubleEndedAddressableHeapTest : AbstractMergeableDoubleEndedAddressableHeapTest() {
    override fun createHeap(): MergeableDoubleEndedAddressableHeap<Int, String> {
        return ReflectedHeap(FACTORY, null)
    }

    override fun createHeap(comparator: Comparator<Int?>?): MergeableDoubleEndedAddressableHeap<Int, String> {
        return ReflectedHeap(FACTORY, comparator)
    }

    @Test(expected = IllegalArgumentException::class)
    fun testNonMeldableInnerHeaps() {
        val h1 = ReflectedHeap<Int, String>(NON_MELDABLE_FACTORY)
        val h2 = ReflectedHeap<Int, String>(NON_MELDABLE_FACTORY)
        h1.meld(h2)
    }

    companion object {
        private val FACTORY: AddressableHeapFactory<Int, String> = object : AddressableHeapFactory<Int?, String?> {
            override fun get(comparator: Comparator<in Int?>?): AddressableHeap<Int, String> {
                return PairingHeap(comparator)
            }
        }

        private val NON_MELDABLE_FACTORY: AddressableHeapFactory<Int, String> =
            object : AddressableHeapFactory<Int?, String?> {
                override fun get(comparator: Comparator<in Int?>?): AddressableHeap<Int, String> {
                    return BinaryTreeAddressableHeap(comparator)
                }
            }
    }
}*/
